#define _CRT_SECURE_NO_WARNINGS 1
#include "SList.h"

void test0()
{
	/*SLTNode* node1 = SLTBuyNode(1);
	SLTNode* node2 = SLTBuyNode(2);
	SLTNode* node3 = SLTBuyNode(3);
	SLTNode* node4 = SLTBuyNode(4);

	node1->next = node2;
	node2->next = node3;
	node3->next = node4;

	SLTNode* plist = node1;
	SLTPrint(plist);*/

	SLTNode* plist = NULL;
	/*SLTPushBack(&plist, 1);
	SLTPushBack(&plist, 2);
	SLTPushBack(&plist, 3);
	SLTPushBack(&plist, 4);*/
	SLTPushFront(&plist, 4);
	SLTPushFront(&plist, 3);
	SLTPushFront(&plist, 2);
	SLTPushFront(&plist, 1);
	SLTPrint(plist);
	/*SLTPopBack(&plist);
	SLTPrint(plist);
	SLTPopBack(&plist);
	SLTPrint(plist);
	SLTPopBack(&plist);
	SLTPrint(plist);
	SLTPopBack(&plist);
	SLTPrint(plist);*/
	/*SLTPopFront(&plist);
	SLTPrint(plist);
	SLTPopFront(&plist);
	SLTPrint(plist); 
	SLTPopFront(&plist);
	SLTPrint(plist); 
	SLTPopFront(&plist);
	SLTPrint(plist); */

	SLTNode* pos = SLTFind(plist, 4);

	SLTInsert(&plist, pos, 100);
	SLTPrint(plist);
	SLTInsertAfter(pos, 99);
	SLTPrint(plist);

	/*SLTErase(&plist, pos);
	SLTPrint(plist);*/

	SLTEraseAfter(pos);
	SLTPrint(plist);

	SLTDestroy(&plist);
	SLTPrint(plist);
}


int main()
{
	test0();
	return 0;
}